import React from "react";
import { Navigate } from 'react-router-dom'
const Movie = React.lazy(() => import("../views/movie"));
const Cinema = React.lazy(() => import("../views/cinema"));
const My = React.lazy(() => import("../views/my"));
const WillMovie = React.lazy(() => import("../views/willMovie"));
const HotMovie = React.lazy(() => import("../views/hotMovie"));

export const routes = [
  {
    path: "/movie",
    element: <Movie></Movie>,
    children: [{
      path: "/movie/hot",
      element: <HotMovie></HotMovie>,
    },{
      path: "/movie/will",
      element: <WillMovie></WillMovie>,
    }]
  },
  {
    path: "/cinema",
    element: <Cinema></Cinema>,
  },
  {
    path: "/my",
    element: <My></My>,
  },
  {
    path: '/',
    element: <Navigate to="/movie/hot"></Navigate>
  }
];
